import { NewShopItem } from "@/api/shop/shop";
import { defineStore } from "pinia";
import { ref } from "vue";

export const useShopStore = defineStore(
  "useShopStore",
  () => {
    const shopInfo = ref<NewShopItem>(null);
    const setShopItem = (item: NewShopItem) => {
      shopInfo.value = item;
    };
    return { shopInfo, setShopItem };
  },
  {
    // 开启本地存储
    persist: {
      enabled: true
    }
  }
);
